<template>
    <div class="m_right">
        <div class="m_des">
            <table border="0" style="width:870px; line-height:22px;" cellspacing="0" cellpadding="0">
                <tr valign="top">
                    <td width="115"><img src="@/assets/images/user.jpg" width="90" height="90" /></td>
                    <td>
                        <div class="m_user">TRACY</div>
                        <p>
                            等级：注册用户 <br />
                            <font color="#ff4e00">您还差 270 积分达到 分红100</font><br />
                            上一次登录时间: 2015-09-28 18:19:47<br />
                            您还没有通过邮件认证 <a href="#" style="color:#ff4e00;">点此发送认证邮件</a>
                        </p>
                        <div class="m_notice">
                            用户中心公告！
                        </div>
                    </td>
                </tr>
            </table>
        </div>

        <!-- <div class="mem_t">资产信息</div>
        <table border="0" class="mon_tab" style="width:870px; margin-bottom:20px;" cellspacing="0" cellpadding="0">
            <tr>
                <td width="33%">用户等级：<span style="color:#555555;">普通会员</span></td>
                <td width="33%">消费金额：<span>￥200元</span></td>
                <td width="33%">返还积分：<span>99R</span></td>
            </tr>
            <tr>
                <td>账户余额：<span>￥200元</span></td>

                <td>红包个数：<span style="color:#555555;">3个</span></td>

                <td>红包价值：<span>￥50元</span></td>

            </tr>
            <tr>
                <td colspan="3">订单提醒：
                    <font style="font-family:'宋体';">待付款(<span>0</span>) &nbsp; &nbsp; &nbsp; &nbsp; 待收货(<span>2</span>)
                        &nbsp;
                        &nbsp; &nbsp; &nbsp; 待评论(<span>1</span>)</font>
                </td>
            </tr>
        </table> -->
        <div class="mem_t">账号信息</div>
        <table  border="0" class="acc_tab" style="width:870px;" cellspacing="0" cellpadding="0">
           
            <tr>
                <td class="td_l">用户ID： </td>
                <td>{{ user.id }}</td>
            </tr>
            <tr>
                <td class="td_l">用户名： </td>
                <td>{{ user.loginName }}</td>
            </tr>
            <tr>
                <td class="td_l">用户姓名： </td>
                <td>{{ user.userName }}</td>
            </tr>
            <tr>
                <td class="td_l b_none">身份证号：</td>
                <td v-if="user.identityCode == null || user.identityCode == ''"><span style="color: red;">未绑定身份证</span>
                </td>
                <td v-else>{{ user.identityCode }}</td>
            </tr>
            <tr>
                <td class="td_l">用户性别： </td>
                <td>{{ user.sex == 1 ? '男':'女' }}</td>
            </tr>
            <tr>
                <td class="td_l b_none">电 话：</td>
                <td>{{ user.mobile }}</td>
            </tr>
            <tr>
                <td class="td_l">邮 箱： </td>
                <td>{{ user.email }}</td>
            </tr>
            <tr>
                <td class="td_l b_none">注册时间：</td>
                <td>{{ user.createTime }}</td>
            </tr>

        </table>
        

    </div>
</template>
<script>
export default {
    name: 'MemberUserInfoRight',
    data() {
        return {
            id: '',
            user:null,
        }
    },
    methods:{
        getUser(){
            this.$axios({
                url:'selectUserById',
                method:'get',
                params:{id:this.id}
            }).then(rs=>{
                if(rs.data.code == 5200 || rs.data.code == '5200'){
                    this.user = rs.data.user
                }
            })
        }
    },
    
    mounted() {
        this.id = window.sessionStorage.getItem('userId')
        this.getUser()
    }
}
</script>